<?php
include "config.php";
logWrite(THIS_PAGE);
$userid = $_REQUEST['uid'];
$photo_id = $_REQUEST['rec_id'];
if ($userid && $photo_id){
    $extname = 'png';
    $user_zone = intval($userid / 10000);
    $savePath = $user_zone. "/" . $userid . "/";
    $newPath = UPLOAD_DIR . $savePath. $photo_id . "." . $extname;   
    @unlink($newPath);
}